﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="myCustomerReceivablesList.aspx.cs"
    Inherits="PeisongWeb.admin.myCustomerReceivablesList" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register TagName="top" Src="controls/top.ascx" TagPrefix="uc1" %>
<%@ Register TagName="menu" Src="controls/menu.ascx" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>应收款 - 想购网长期采购物流配送系统</title>
    <!--#include file="style.inc"-->

    <script type="text/javascript" language="javascript" src="../app_common/scripts/jquery-cn.js"></script>

    <script type="text/javascript">
        function resetSrh() {
            document.getElementById("ddl_Type").value = "";
            document.getElementById("ext_StartInputDt").value = "";
            document.getElementById("ext_EndInputDt").value = "";
        }
        function resetSrh2() {
            document.getElementById("txt_orderNo").value = "";
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sm1" runat="server">
    </asp:ScriptManager>
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    <uc1:top ID="Top1" runat="server" />
    <uc2:menu ID="Menu1" runat="server" />
    <div id="admin-body">
        <h2 class="section-cms">
            <asp:Literal runat="server" ID="lt_company"></asp:Literal>的应收款
        </h2>
        <p>
            &nbsp;</p>
        <ext:Panel ID="Panel1" runat="server" Title="应收款搜索" BodyStyle="padding:5px 5px 0"
            Width="960" Frame="true" ButtonAlign="Center">
            <Body>
                <div id="admin_edit_content_search">
                    <ul>
                        <li style="width: 200px; margin-right: 20px">
                            <label>
                                应收状态
                            </label>
                            <asp:DropDownList runat="server" ID="ddl_Type" DataTextField="name" DataValueField="xm">
                            </asp:DropDownList>
                        </li>
                        <li>
                            <label>
                                开始日期</label>
                            <ext:DateField ID="ext_StartInputDt" runat="server" AllowBlank="true" ReadOnly="true"
                                Width="100" />
                        </li>
                        <li>
                            <label>
                                结束日期
                            </label>
                            <ext:DateField ID="ext_EndInputDt" ReadOnly="true" runat="server" Width="100" />
                        </li>
                        <li style="width: auto;">[<asp:LinkButton ID="lbtn_Search" runat="server" Text="搜 索"
                            OnClick="lbtn_Search_Click"></asp:LinkButton>]&nbsp;&nbsp;&nbsp; [<a href="javascript:resetSrh();">重
                                置</a>] </li>
                        <li style="width: auto; padding-left: 20px">
                            <ext:Button runat="server" ID="btnReturn" Text="返回" AutoPostBack="true" Icon="ArrowSwitch"
                                OnClick="btnReturn_Click">
                            </ext:Button>
                        </li>
                    </ul>
                </div>
            </Body>
        </ext:Panel>
        <p>
            &nbsp;</p>
        <div id="admin_list_content">
            <table cellpadding="0" cellspacing="0">
                <tr class="header-row">
                    <th>
                        公司名称
                    </th>
                    <th>
                        应收状态
                    </th>
                    <th>
                        金 额
                    </th>
                    <th>
                        结算方式
                    </th>
                    <th>
                        结算周期
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                <asp:Repeater ID="rpt_list" runat="server" OnItemCommand="rpt_list_ItemCommand">
                    <ItemTemplate>
                        <tr class='<%# Container.ItemIndex%2==0? "row-alt":"alt"  %>'>
                            <td>
                                <%# Eval("companyName")%>
                            </td>
                            <td>
                                <span style="<%#Eval("status").ToString()=="1"?"color:red": "" %>">
                                    <%# Eval("StatusName")%>
                                </span>
                            </td>
                            <td>
                                <%# string.Format("￥<span class='red'>{0:F2}</span>", Eval("amount"))%>
                            </td>
                            <td>
                                <%# Eval("payMethodName")%>
                            </td>
                            <td>
                                <%# Eval("startDt")%>
                                —
                                <%# Eval("endDt")%>
                            </td>
                            <td>
                                <asp:LinkButton ID="lbt_Details" runat="server" CommandName="Details" CommandArgument='<%# Eval("payId") %>'
                                    Text="查看详情">
                                </asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
            <div id="page">
                <webdiyer:AspNetPager ID="AspNetPager1" NumericButtonType="Text" MoreButtonType="Text"
                    OnPageChanged="AspNetPager1_PageChanged" runat="server" AlwaysShow="True" PageSize="20"
                    InvalidPageIndexErrorMessage="无效页码" PageIndexOutOfRangeErrorMessage="页码超出范围"
                    ShowCustomInfoSection="Left" CustomInfoHTML=" 每页%PageSize%条记录 | 总共%RecordCount%条记录 "
                    CustomInfoTextAlign="Left" HorizontalAlign="Right" NextPageText="下一页" FirstPageText="首页"
                    LastPageText="末页" PrevPageText="上一页">
                </webdiyer:AspNetPager>
            </div>
            <div style="padding-top: 20px">
                <table cellpadding="0" cellspacing="0">
                    <tr class="header-row">
                        <td width="20%" style="border-right: 1px solid #99BBE8;">
                            订单数量
                        </td>
                        <td width="20%" style="border-right: 1px solid #99BBE8;">
                            已收金额
                        </td>
                        <td width="20%" style="border-right: 1px solid #99BBE8;">
                            未收金额
                        </td>
                        <td width="20%" style="border-right: 1px solid #99BBE8;">
                            总金额
                        </td>
                    </tr>
                </table>
                <table border="0" cellspacing="0" cellpadding="0" class="list_border">
                    <tr>
                        <td width="20%">
                            <asp:Literal runat="server" ID="lit_orderNum"></asp:Literal>
                        </td>
                        <td width="20%">
                            <asp:Literal runat="server" ID="lit_payMoney"></asp:Literal>
                        </td>
                        <td width="20%">
                            <asp:Literal runat="server" ID="lit_notPayMoney"></asp:Literal>
                        </td>
                        <td width="20%">
                            <asp:Literal runat="server" ID="lit_total"></asp:Literal>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <ext:Window ID="orderItem" runat="server" Title="订单详情" Height="620px" Width="920px"
            BodyStyle="padding: 6px; background-color: #fff;" AutoScroll="true" Modal="True"
            Resizable="false" ShowOnLoad="false" Draggable="false" Icon="ApplicationViewDetail">
            <Body>
                <asp:UpdatePanel runat="server" ID="up1" UpdateMode="Conditional">
                    <Triggers>
                        <asp:PostBackTrigger ControlID="lbn_Import" />
                    </Triggers>
                    <ContentTemplate>
                        <div class="details">
                            <table width="98%" border="0" cellpadding="4" cellspacing="1" style="text-align: left">
                                <tr>
                                    <td>
                                        订单号：
                                        <asp:TextBox ID="txt_orderNo" runat="server" Width="80px"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:LinkButton ID="lbn_select" runat="server" Text="［搜索］" CausesValidation="false"
                                            OnClick="lbn_select_Click">
                                        </asp:LinkButton>
                                        <a href="javascript:resetSrh2();">［重置］</a> <span style="<%=power>=2?"": "display:none" %>">
                                            <asp:LinkButton ID="lbn_Import" runat="server" Text="［导出］" CausesValidation="false"
                                                OnClick="lbn_Import_Click">
                                            </asp:LinkButton>
                                        </span>
                                    </td>
                                </tr>
                            </table>
                            <p>
                                &nbsp;</p>
                            <table width="98%" border="0" cellpadding="4" cellspacing="1" bgcolor="#99BBE8" style="text-align: left">
                                <tr align="center" style="height: 20px;">
                                    <td width="10%" bgcolor="#C0D5F0">
                                        商品名称
                                    </td>
                                    <td width="10%" bgcolor="#C0D5F0">
                                        数量
                                    </td>
                                    <td width="10%" bgcolor="#C0D5F0">
                                        单价
                                    </td>
                                    <td width="10%" bgcolor="#C0D5F0">
                                        小计
                                    </td>
                                    <td width="10%" bgcolor="#C0D5F0">
                                        订单号
                                    </td>
                                    <td width="10%" bgcolor="#C0D5F0">
                                        状态
                                    </td>
                                    <td width="10%" bgcolor="#C0D5F0">
                                        成功日期
                                    </td>
                                </tr>
                                <asp:Repeater runat="server" ID="rpt_orderItem">
                                    <ItemTemplate>
                                        <tr align="center" style="height: 20px;">
                                            <td bgcolor="#FFFFFF">
                                                <%#Eval("proName")%>
                                            </td>
                                            <td bgcolor="#FFFFFF">
                                                <%#Eval("quantity")%>
                                            </td>
                                            <td bgcolor="#FFFFFF" align="center">
                                                <%#String.Format("{0:F2}",Eval("price"))%>/<%#Eval("unit")%>
                                            </td>
                                            <td bgcolor="#FFFFFF" align="center">
                                                <%#String.Format("{0:F2}", Eval("amount"))%>
                                            </td>
                                            <td bgcolor="#FFFFFF" align="center">
                                                <%#Eval("orderNo")%>
                                            </td>
                                            <td bgcolor="#FFFFFF" align="center">
                                                <%#Eval("statusName")%>
                                            </td>
                                            <td bgcolor="#FFFFFF" align="center">
                                                <%#Eval("updateStatusdt")%>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                                <tr align="center" style="height: 20px;">
                                    <td bgcolor="#C0D5F0" colspan="3">
                                        合&nbsp;&nbsp;计
                                    </td>
                                    <td bgcolor="#FFFFFF">
                                        ￥<asp:Label runat="server" CssClass="red" ID="lbl_Total"></asp:Label>
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                            <div>
                                <webdiyer:AspNetPager ID="AspNetPager2" NumericButtonType="Text" MoreButtonType="Text"
                                    runat="server" AlwaysShow="False" PageSize="20" InvalidPageIndexErrorMessage="无效页码"
                                    PageIndexOutOfRangeErrorMessage="页码超出范围" ShowCustomInfoSection="Left" CustomInfoHTML=" 每页%PageSize%条记录 | 总共%RecordCount%条记录 "
                                    CustomInfoTextAlign="Left" HorizontalAlign="Right" OnPageChanged="AspNetPager2_PageChanged"
                                    NextPageText="下一页" FirstPageText="首页" LastPageText="末页" PrevPageText="上一页">
                                </webdiyer:AspNetPager>
                            </div>
                            <asp:HiddenField runat="server" ID="hid_PayId" />
                            <asp:HiddenField runat="server" ID="hid_companyId" />
                            <asp:HiddenField runat="server" ID="hid_startDt" />
                            <asp:HiddenField runat="server" ID="hid_endDt" />
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </Body>
        </ext:Window>
    </div>
    </form>
</body>
</html>
